<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的网站</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
    <p>Hello, World!</p>
    <button onclick="getUser()">获取用户信息</button>

    <form action="/login" method="post">
        <label>
            <input type="text" name="username">
            <input type="text" name="password">
            <input type="submit" value="提交">
        </label>
    </form>

    <script>
        function getUser() {
            axios.get("/get-user").then(res => {
                alert(JSON.stringify(res.data))
            })
        }
    </script>
</body>
</html>